#ifndef PLAYER_H_INCLUDED
#define PLAYER_H_INCLUDED
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>

class ImgMgr;
class Level;

class Player
{
public:
    Player();
    void init(ImgMgr *imageManager);
    void event(Level *level, sf::View *view);
    void render(sf::RenderWindow *app);
    sf::Vector2f getPosition() const;
    float random(float a, float b);
    void setPosition(const sf::Vector2f position);
    int getHeart() const;
    int getEnergy() const;
    void modifyHeart(const int heart);
    void modifyEnergy(const float energy);

private:
    sf::Sprite m_skin[10];
    int m_currentRender;
    sf::Clock m_clockFrame;
    sf::Clock m_clockFire;
    sf::Clock m_clockRegain;
    int m_direction;
    int m_heart;
    float m_energy;
    sf::SoundBuffer m_bufferFire;
    sf::Sound m_soundFire;
    bool m_dead;

};



#endif // PLAYER_H_INCLUDED
